#include "DataManager.h"

DataManager::DataManager(std::string path)
{
	inputManager = new InputManager(path);
	outputManager = new OutputManager(inputManager->timeNum, inputManager->clientNum, inputManager->siteNum, inputManager->clientName, inputManager->siteName);
}

void DataManager::setTime(int timeID)
{
	this->outputManager->setTime(timeID);
}

void DataManager::setClient(int clientID)
{
	outputManager->setClient(clientID);
}

void DataManager::writeLog(int siteID, int flow)
{
	outputManager->writeLog(siteID, flow);
}

void DataManager::writeLog(int timeID, int clientID, int siteID, int flow)
{
	this->outputManager->writeLog(timeID, clientID, siteID, flow);
}

void DataManager::writeFile(std::string filePath)
{
	this->outputManager->writeFile(filePath);
}

void DataManager::freopen(std::string path)
{
	this->inputManager->freopen(path);
}

int DataManager::getTotalTime()
{
	return this->inputManager->getTotalTime();
}

void DataManager::getDemands(int timeID, std::vector<int>& bandwidthDemand)
{
	this->inputManager->getDemands(timeID, bandwidthDemand);
}

void DataManager::getSiteLimits(std::vector<int>& bandwidthLimit)
{
	this->inputManager->getSiteLimits(bandwidthLimit);
}

void DataManager::getQosGraph(int& siteNum, int& clientNum, std::vector<std::pair<int, int>>& graph)
{
	this->inputManager->getQosGraph(siteNum, clientNum, graph);
}
